/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import { cssMap, styleMap } from './config';

export function createHtml(data: any, type: string = 'seo') {
  // const data = {
  //   id: '27',
  //   title: '商业转载请联系作者获得授权，非商业转载请注明出处',
  //   content:
  //     '<p>快宝驿站是一个<strong>第三方快递代收平台</strong>，对接通达系、极兔、众邮、邮政、<a href="https://www.zhihu.com/search?q=%E4%B8%B0%E7%BD%91&amp;search_source=Entity&amp;hybrid_search_source=Entity&amp;hybrid_search_extra=%7B%22sourceType%22%3A%22answer%22%2C%22sourceId%22%3A2297195520%7D" target="_blank" data-za-not-track-link="true" class="RichContent-EntityWord css-pgtd2j">丰网</a>等<strong>14家</strong>品牌包裹，<strong>是目前市场上对接品牌最多的一家</strong>。<br/>如果您是一个驿站经营者，那么选择一个合适的系统至关重要。它的<strong>功能是否强大，操作是否便捷，服务是否及时</strong>，将会影响到你驿站后续的工作效率。<br/>而快宝驿站系统具有<strong>高效稳定、功能丰富、服务及时</strong>的特点，只需要前往手机<a href="https://www.zhihu.com/search?q=%E5%BA%94%E7%94%A8%E5%95%86%E5%BA%97&amp;search_source=Entity&amp;hybrid_search_source=Entity&amp;hybrid_search_extra=%7B%22sourceType%22%3A%22answer%22%2C%22sourceId%22%3A2297195520%7D" target="_blank" data-za-not-track-link="true" class="RichContent-EntityWord css-pgtd2j">应用商店</a>下载快宝驿站APP，不存在任何使用门槛，<strong>系统完全免费</strong>，不抽取<a href="https://www.zhihu.com/search?q=%E4%BD%A3%E9%87%91&amp;search_source=Entity&amp;hybrid_search_source=Entity&amp;hybrid_search_extra=%7B%22sourceType%22%3A%22answer%22%2C%22sourceId%22%3A2297195520%7D" target="_blank" data-za-not-track-link="true" class="RichContent-EntityWord css-pgtd2j">佣金</a>，没有平台使用费、<a href="https://www.zhihu.com/search?q=%E5%8A%A0%E7%9B%9F%E8%B4%B9&amp;search_source=Entity&amp;hybrid_search_source=Entity&amp;hybrid_search_extra=%7B%22sourceType%22%3A%22answer%22%2C%22sourceId%22%3A2297195520%7D" target="_blank" data-za-not-track-link="true" class="RichContent-EntityWord css-pgtd2j">加盟费</a>等。<br/><strong>l</strong> <strong>快宝系统高效稳定，强大功能覆盖驿站日常工作</strong><br/>经营一家驿站，如果选址得当、客源充足，那么每天的包裹量大约在300-500单，应对如此庞大的业务需求，快宝驿站APP具有以下功能，让您事半功倍：<br/>1、<strong>快件出入库</strong>：快宝驿站APP支持批量出入库、拍照出入库等，超级OCR毫秒级识别，速度快过巴枪，只需0.1秒，完成单号、手机号等7大维度信息扫描，包裹极速入库，轻松结束时效考核。<br/>2、<strong>全方位通知</strong>：快宝驿站有短信、云呼、微信等渠道通知客户，高效便捷，信息不遗漏。<br/>3、<strong><a href="https://www.zhihu.com/search?q=%E5%BA%93%E5%AD%98%E7%AE%A1%E7%90%86&amp;search_source=Entity&amp;hybrid_search_source=Entity&amp;hybrid_search_extra=%7B%22sourceType%22%3A%22answer%22%2C%22sourceId%22%3A2297195520%7D" target="_blank" data-za-not-track-link="true" class="RichContent-EntityWord css-pgtd2j">库存管理</a></strong>：多途径查询库存状态，自动留存详细出入库操作记录以及底单照片，避免投诉、索赔。<br/>4、<strong>智能管理</strong>：快宝驿站支持一体化出库仪等智能硬件设备，实现全自助取件；支持智能化管理，有人脸查件，智能驿站等多种智能化管理应用场景。<br/></p><div class="media-wrap image-wrap"><img class="media-wrap image-wrap" src="https://pic1.zhimg.com/50/v2-c3077d4dccf583801375e637c2aeec51_720w.jpg?source=1940ef5c"/></div><div class="media-wrap image-wrap"><img class="media-wrap image-wrap" src="https://pic1.zhimg.com/80/v2-c3077d4dccf583801375e637c2aeec51_1440w.webp?source=1940ef5c"/></div><p><br/>快宝驿站APP功能<strong>l</strong> <strong>快宝驿站服务尽心，客服全年无休及时解答</strong><br/>对快递行业来说，时间就是金钱，每一分钟的延误都是损失。试想一下，在使用系统的过程中如果遇到问题，但没有办法立刻解决，就会对后续的业务造成巨大影响。<br/>我们快宝拥有强大客服团队，7*18小时全年无休服务，若有疑问，只需加入我们的客服微信群，直接在群里咨询相关问题，快宝客服基本做到有问秒答。<br/></p><div class="media-wrap image-wrap"><img class="media-wrap image-wrap" src="https://pic1.zhimg.com/50/v2-696157d19acb5e1f09bfa2c02488be7c_720w.jpg?source=1940ef5c"/></div><div class="media-wrap image-wrap"><img class="media-wrap image-wrap" src="https://pic1.zhimg.com/80/v2-696157d19acb5e1f09bfa2c02488be7c_1440w.webp?source=1940ef5c"/></div><p><br/>快宝客服答疑<strong>l</strong> <strong>快宝<a href="https://www.zhihu.com/search?q=%E7%9B%88%E5%88%A9%E6%A8%A1%E5%BC%8F&amp;search_source=Entity&amp;hybrid_search_source=Entity&amp;hybrid_search_extra=%7B%22sourceType%22%3A%22answer%22%2C%22sourceId%22%3A2297195520%7D" target="_blank" data-za-not-track-link="true" class="RichContent-EntityWord css-pgtd2j">盈利模式</a>多元，促进驿站门店增收</strong><br/>快宝驿站支持各种形式入驻，不像一些驿站需要使用专属门头、也没有标准化装修的规定。快宝驿站打造多元盈利模式，引入<a href="https://www.zhihu.com/search?q=%E7%A4%BE%E5%8C%BA%E5%9B%A2%E8%B4%AD&amp;search_source=Entity&amp;hybrid_search_source=Entity&amp;hybrid_search_extra=%7B%22sourceType%22%3A%22answer%22%2C%22sourceId%22%3A2297195520%7D" target="_blank" data-za-not-track-link="true" class="RichContent-EntityWord css-pgtd2j">社区团购</a>、同城跑腿等<a href="https://www.zhihu.com/search?q=%E4%BE%BF%E6%B0%91%E6%9C%8D%E5%8A%A1&amp;search_source=Entity&amp;hybrid_search_source=Entity&amp;hybrid_search_extra=%7B%22sourceType%22%3A%22answer%22%2C%22sourceId%22%3A2297195520%7D" target="_blank" data-za-not-track-link="true" class="RichContent-EntityWord css-pgtd2j">便民服务</a>，增加客户的粘性，让他们寄件时第一时间想到你。如果你的客户足够多，可以定制公众号让他们关注，将流量引至线上，当粉丝积累到一定数量时，还可以在公众号上赚取广告费。<br/></p><div class="media-wrap image-wrap"><img class="media-wrap image-wrap" src="https://pic1.zhimg.com/50/v2-b3413296bb4381ca2d2af4b261b2dec3_720w.jpg?source=1940ef5c"/></div><div class="media-wrap image-wrap"><img class="media-wrap image-wrap" src="https://pic1.zhimg.com/80/v2-b3413296bb4381ca2d2af4b261b2dec3_1440w.webp?source=1940ef5c"/></div><p><br/>部分快递行业公众号推广收费<strong>l</strong> <strong>快宝实力雄厚，是数万经营者的选择</strong><br/>成立于2012年，快宝旗下研发快宝驿站、快宝共配、微掌柜等产品，服务超百万快递末端人员，拥有数万家线下门店，获得“上海高新科技企业”“快递末端创新奖”“上海科技<a href="https://www.zhihu.com/search?q=%E5%B0%8F%E5%B7%A8%E4%BA%BA&amp;search_source=Entity&amp;hybrid_search_source=Entity&amp;hybrid_search_extra=%7B%22sourceType%22%3A%22answer%22%2C%22sourceId%22%3A2297195520%7D" target="_blank" data-za-not-track-link="true" class="RichContent-EntityWord css-pgtd2j">小巨人</a>企业”“快递<a href="https://www.zhihu.com/search?q=%E4%BE%9B%E5%BA%94%E5%95%86&amp;search_source=Entity&amp;hybrid_search_source=Entity&amp;hybrid_search_extra=%7B%22sourceType%22%3A%22answer%22%2C%22sourceId%22%3A2297195520%7D" target="_blank" data-za-not-track-link="true" class="RichContent-EntityWord css-pgtd2j">供应商</a>大奖”等荣誉，在业界有口皆碑，基本上，快递从业者们都知道我们的品牌。<br/></p><div class="media-wrap image-wrap"><img class="media-wrap image-wrap" src="https://pica.zhimg.com/50/v2-e5246723f25ebe9bd923d0ef1accceab_720w.jpg?source=1940ef5c"/></div><div class="media-wrap image-wrap"><img class="media-wrap image-wrap" src="https://pica.zhimg.com/80/v2-e5246723f25ebe9bd923d0ef1accceab_1440w.webp?source=1940ef5c"/></div><p><br/>快宝五维产品体系综上所得，快宝驿站系统优势众多、实力强大，如果您想开快递驿站的话，快宝驿站系统是个很不错的选择。</p>',
  //   category: '驿站端',
  //   tag: ['驿站代收', '出入库', '取件码'],
  //   top: '0',
  //   status: '1',
  //   read_count: '98',
  //   is_deleted: '0',
  //   create_time: '2023-03-17 16:47:06',
  //   update_time: '2023-03-29 17:35:45',
  //   picture:
  //     'https://pic1.zhimg.com/50/v2-c3077d4dccf583801375e637c2aeec51_720w.jpg?source=1940ef5c',
  // };
  let dataSource = '';
  if (type == 'seo') {
    dataSource =
      cssMap['bootstrap'] +
      styleMap['seo'] +
      `<div class="container p-0">
      <div class="kb-content p-3">
        <h5>${data?.title || ''}</h5>
        <div class="kb-content-author d-flex align-items-center">
          <img
            class="logo mr-3"
            src="https://osscdn-kbad.kuaidihelp.com/admin/ad/2023/03/02/64000c6cbbad9/logo2.png"
          />
          <div class="w-100 d-flex justify-content-between">
            <div>
              <div class="d-flex justify-content-between" style="color: #666">
                <div>
                  浏览量：<span class="text-danger"
                    >${data?.read_count || '0'}</span
                  >&nbsp;发布时间：${data?.create_time || ''}
                </div>
              </div>
              <div>
                ${data?.tag
                  .map((item) => `<span class="badge badge-primary mr-1">${item}</span>`)
                  .join('')}
              </div>
            </div>
            <img
              class="share"
              src="https://osscdn-kbad.kuaidihelp.com/admin/ad/2023/03/23/641bb9f98a728/share.png"
            />
          </div>
        </div>
        <div class="mt-3">${data?.content || ''}</div>
      </div>
      <div class="slideBox">
        <div class="d-flex justify-content-around align-items-center pt-5 pb-5">
          <!-- <img
            class="share_icon share_wx"
            src="https://osscdn-kbad.kuaidihelp.com/admin/ad/2023/03/23/641bbf8baba52/wx.png"
          /> -->
          <img
            id="copy"
            data-clipboard-action="copy"
            data-clipboard-text="location.href"
            class="share_icon share_copy"
            src="https://osscdn-kbad.kuaidihelp.com/admin/ad/2023/03/23/641bbf9f95139/copy.png"
          />
        </div>
      </div>
      <div class="kb-mark"></div>
    </div>`;
  }
  return dataSource;
}
